<LayoutEditFormBox :loading="loading">

    <template slot="main">

        <el-form ref="editForm" :model="form" label-width="150px" label-position="left">

            <LayoutCell>
                <LayoutCellItem title="入驻设置">
                    <el-form-item label=" 入驻方式" prop="enter_type" :rules="{ required: true, message: '入驻方式 不能为空'}">
                        <el-radio-group v-model="form.enter_type">
                            <el-radio :label="1">申请</el-radio>
                        </el-radio-group>
                    </el-form-item>

                    <el-form-item label="是否需要审核" prop="enter_auth" :rules="{ required: true, message: '是否需要审核 不能为空'}">
                        <el-radio-group v-model="form.enter_auth">
                            <el-radio :label="1">是</el-radio>
                            <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                    </el-form-item>

                    <el-form-item label="是否需要营业执照" prop="enter_license" :rules="{ required: true, message: '是否需要营业执照 不能为空'}">
                        <el-radio-group v-model="form.enter_license">
                            <el-radio :label="1">是</el-radio>
                            <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                    </el-form-item>

                    <el-form-item label="是否需要身份证" prop="enter_id_card" :rules="{ required: true, message: '是否需要身份证 不能为空'}">
                        <el-radio-group v-model="form.enter_id_card">
                            <el-radio :label="1">是</el-radio>
                            <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                    </el-form-item>

                    <el-form-item label="设置过期天数" prop="validity_days" :rules="[{trigger: ['blur', 'change'] ,validator: $vFN.Tools.validateStock}]">
                        <el-input v-model="form.validity_days" style="width: 150px;"><template slot="append">天</template></el-input>
                    </el-form-item>

                    <el-form-item label="入驻条件" prop="enter_condition" :rules="{ required: true, message: '入驻条件 不能为空'}">
                        <el-radio-group v-model="form.enter_condition">
                            <el-radio :label="1">免费</el-radio>
                            <el-radio :label="2">购买指定商品</el-radio>
                        </el-radio-group>
                    </el-form-item>

                    <el-form-item label="购买商品" v-if="form.enter_condition == 2" :rules="{ required: true, message: '购买商品 不能为空'}">
                        <SelectDataGoods v-model="goodsIds" :appWindow="appWindow" :count="12"
                            :apiConfig="$vFN.Tools.getAppGlobalData('componentsApiConfig.SelectDataGoods', appWindow)">
                        </SelectDataGoods>
                    </el-form-item>

                    <el-form-item label="申请协议" prop="agreement_register">
                        <el-input type="textarea" :rows="6" v-model="form.agreement_register"></el-input>
                    </el-form-item>

                    <el-form-item label="入驻协议" prop="agreement_enter">
                        <el-input type="textarea" :rows="6" v-model="form.agreement_enter"></el-input>
                    </el-form-item>
                </LayoutCellItem>
            </LayoutCell>

        </el-form>

    </template>
    <template slot="footer">
        <el-button type="primary" @click="sum()">确定</el-button>
    </template>

</LayoutEditFormBox>